﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Genesis.Management.Commands.Module
{
    [Genesis.Common.Attributes.CommandCode("Genesis.Management.Commands.Module.File.Search")]
    [Genesis.Common.Attributes.CommandDescription("Search for a file")]
    [Genesis.Common.Attributes.CommandName("File Search")]
    public class ShowFileSearch : Genesis.Common.Classes.CommandBase, Genesis.Common.Interfaces.ICommand
    {
        #region ICommand Members

        void Genesis.Common.Interfaces.ICommand.Execute()
        {
            Genesis.Client.Common.Forms.WebBrowser webBrowser = 
                new Genesis.Client.Common.Forms.WebBrowser();

            webBrowser.Host = this.host;

            webBrowser.PageProperties.Add(
                new Genesis.Common.Classes.PageProperty(
                    "Url",
                    string.Format("http://localhost:2147/genesis.management.web/Module/File/Default.aspx")));

            webBrowser.Navigate();

            webBrowser.GalleryGroupName = "Module";
            webBrowser.GalleryGroupText = "Module<br/><b>File Management</b>";

            base.host.CreateWindow(webBrowser);
        }

        #endregion
    }
}
